package com.wbdgj.ui.home;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.wbdgj.R;
import com.wbdgj.base.BaseActivity;
import com.wbdgj.views.DropDownMenuView;

/**
 * Created by Administrator on 2018/5/2.
 */

public class ExampleActivity extends BaseActivity{

    private Context context = this;
    private DropDownMenuView dropDownMenu;
    @Override
    protected int getLayoutResId() {
        return R.layout.ui_example;
    }

    @Override
    protected void initView() {
        dropDownMenu = (DropDownMenuView)findViewById(R.id.dropDownMenu);
        TextView textView = (TextView) findViewById(R.id.view_filter);
        textView.setOnClickListener(new View.OnClickListener() {
            @Override public void onClick(View v) {
                if(!dropDownMenu.isOpen()){
                    dropDownMenu.open();
                }
            }
        });
    }

    private void onlinecount() {
//        Call<ResultObjectModel> call = HttpAdapter.getSerives().onlinecount(BaseApplication.getInstance().getSpUtil().getString(SpKeyUtils.TOKEN));
//        call.enqueue(new OnResponseListener<ResultObjectModel>(context) {
//            @Override
//            protected void onSuccess(ResultObjectModel userModelBaseResultModel) {
//                if(userModelBaseResultModel.getStatus()==0){
//                    ToastUtils.toastShort(userModelBaseResultModel.getMsg());
//                    DecimalFormat decimalFormat = new DecimalFormat("###################.###########");
//                    List<LinkedTreeMap> linkedTreeMapList = (List<LinkedTreeMap>) userModelBaseResultModel.getData();
//
//                }else if(userModelBaseResultModel.getStatus()==1011){
//                    ToastUtils.toastShort(userModelBaseResultModel.getMsg());
//                    Intent intent = new Intent(context, LoginActivity.class);
//                    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
//                    startActivity(intent);
//                }else{
//                    ToastUtils.toastShort(userModelBaseResultModel.getMsg());
//                }
//            }
//        });
    }
}
